package james.gan.config.spring;

import org.springframework.context.ApplicationContext;

import james.gan.container.ServiceContainer;

public class SpringServiceContainer implements ServiceContainer {
	
	private ApplicationContext applicationContext;

	public SpringServiceContainer(ApplicationContext applicationContext) {
		super();
		this.applicationContext = applicationContext;
	}

	@Override
	public <T> T getBean(Class<T> clz) {
		return applicationContext.getBean(clz);
	}

}
